﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SSharp.Core.DataTypes {
	/// <summary>
	/// In Scheme, this is refered to as a stream. I call it a DataStream to differentiate between this and an i/o stream.
	/// 
	/// To create a stream, use Pair like you create lists with Cons. (Making a stream with existing values makes no sense)
	/// </summary>
	public static class DataStream {
		public class Pair : Cons {
			public Pair(object car, Promise cdr)
				: base(car, cdr) {
			}

			public override dynamic cdr {
				get { return Promise.ForcePromise(base.cdr); }
				set { base.cdr = value; }
			}
		}
	}
}
